{extend name='base'}
{block name='nav2'}
    <a><cite>新闻中心</cite></a>
{/block}
{block name='nav3'}
    <a><cite>新闻评论管理</cite></a>
{/block}
{block name='con1'}
    <div class="x-body">
        <xblock>
            <span class='layui-btn'>评论列表</span>
        </xblock>
        <table class="layui-table">
            <thead>
                <tr>
                    <th>序号</th>
                    <!-- <th>日期</th> -->
                    <th>新闻标题</th>
                    <th>评论人</th>
                    <th>评论内容</th>
                    <th>审核</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody id="x-img">
            {volist name='arr' id='list' key='i'}
                <tr>
                    <td>
                        {$i}
                    </td>
                    <!-- <td>
                        {:date('Y/m/d',$list.date)}
                    </td> -->
                    <td>
                        {$list.title}
                    </td>
                    <td>
                        {$list.commenter}
                    </td>
                    <td>
                        {:mb_substr($list.comment,0,20,'utf-8')}...
                        <!-- {$list.audit} -->
                    </td>
                    <td class="td-manage">
                        <a title="审核" href="{:url('newscomment_audit',['id'=>$list.id])}">
                        {if condition="($list.audit=='nochecked')"}
                            <span class="layui-btn layui-btn-small">审 核</span>
                        {elseif condition="($list.audit=='nopass')" /}
                        <span class="layui-btn layui-btn-danger layui-btn-mini">未通过</span>
                        {else/}
                        <span class="layui-btn layui-btn-normal layui-btn-mini">已通过</span>
                        {/if}
                        </a>
                    </td>
                    <td class="td-manage">
                        <!-- <a title="修改" href="{:url('newscomment_edit',['id'=>$list.id])}" style="text-decoration:none">
                            <i class="layui-icon">&#xe642;</i>
                        </a> -->
                        <a title="删除" onclick="return del();" href="{:url('newscomment_del',['id'=>$list.id])}">
                            <i class="layui-icon">&#xe640;</i>
                        </a>
                    </td>
                </tr>
            {/volist}
            </tbody>
        </table>
        {$arr}
        <div id="page"></div>
    </div>
{/block}